package cn.hncum.feign.clients;

import cn.hnucm.bean.TbCapital;
import cn.hnucm.bean.TbGoodsOrder;
import cn.hnucm.vo.AddOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author:liweihua
 * @Description: 订单操作
 * @Date: 23:32$ 2021/12/28/028$
 * @Modified:
 */
@FeignClient("orderservice")
public interface EsOrderClient {
    @PostMapping("/orderservice/tbGoodsOrder/addOrderVo")
    public TbGoodsOrder addOrder(@RequestBody AddOrder addOrder);

    @GetMapping("/orderservice/tbGoodsOrder/getOrderByIdVo/{orderId}")
    public TbGoodsOrder getOrderById(@PathVariable("orderId") int orderId);

    @GetMapping("/orderservice/cancelOrderVo/{orderId}")
    public TbGoodsOrder finishOrderById(@PathVariable("orderId") int orderId);

    @PostMapping("/orderservice/addCapitalVo")
    public Boolean createCapital(@RequestBody TbCapital tbCapital);
}
